package com.company;

import java.util.Scanner;

/**
 * @author Administrator
 */
public class HJ1字符串最后一个单词的长度 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String strings = scanner.nextLine();
        String[] splitString = strings.split(" ");
        String lastString = splitString[splitString.length - 1];
        System.out.println(lastString.length());
        scanner.close();
    }
}
